<h1>Список фотографий</h1>

<table>
  <thead>
    <tr>
      <th>Превью</th>
      <th>Альбом</th>
      <th>Категория</th>
      <th>Название</th>
      <th>Описание</th>
      <th>Дата обновления</th>
      <th></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($photos as $photo): ?>
    <tr>
      <td><a class="td-full" href="<?php echo url_for('photo/show?id='.$photo->getId()) ?>"><img src="<?= $photo->getLink()?>"/></a></td>
      <td><?php echo $photo->getAlbum()->getName() ?></td>
      <td><?php echo $photo->getCategory()->getName() ?></td>
      <td><?php echo $photo->getName() ?></td>
      <td><?php echo $photo->getDescription() ?></td>
      <td><?php echo $photo->getUpdatedAt() ?></td>
      <td><a class="td-full edit" href="<?php echo url_for('photo/edit?id='.$photo->getId()) ?>"></a></td>
      <td><a class="td-full delete" href="<?php echo url_for('photo/delete?id='.$photo->getId()) ?>"></a></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('photo/new') ?>">New</a>
